package com.learn.springboot.controller.exception;

import com.learn.springboot.exception.ServiceException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;

/**
 * @author wangxing
 * @version 2020/8/3 11:38 Administrator
 */
@Controller
public class ExceptionController {
    @GetMapping("/exception")
    public String exception() throws Exception {
        throw new Exception("出现异常");
    }
    @GetMapping("/exceptionService")
    public String exceptionService() throws ServiceException {
        throw new ServiceException("业务出现异常");
    }
    @GetMapping("/exceptionService2")
    public String exceptionService2() throws Exception {
        throw new ServiceException("业务出现异常");
    }
}
